package com.heima.schedule.controller;

import com.heima.schedule.dtos.Task;
import com.heima.schedule.service.ITaskService;
import com.heima.user.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TaskController {

    @Autowired
    private ITaskService taskService;
    @PostMapping("task/addtask")
    public ResponseResult addTask(@RequestBody Task task) {
        return ResponseResult.okResult(taskService.addTask(task));
    }
}
